package com.rms.server.VO;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
@Schema(name = "OrderResponse", description = "订单响应数据传输对象")
public class OrderResponse {
    @Schema(description = "订单的唯一标识符")
    private Long orderId;
    @Schema(description = "订单的状态")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime orderDate;
    @Schema(description = "订单的总价")
    private BigDecimal totalPrice;
    @Schema(description = "订单的总利润")
    private BigDecimal totalProfit;
    @Schema(description = "订单的备注信息")
    private List<OrderDetailResponse> orderDetails;
    @Schema(description = "订单的利润率")
    private List<IngredientStockChange> stockChanges; // 库存变化
}
